Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a base branch
Nothing to show
...
Choose a head branch
Nothing to show
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 2 contributors
Showing with 38 additions and 8 deletions.
  1. +6 −4 .travis.yml
  2. +4 −1 .travis/deploy.sh
  3. BIN .travis/key.enc
  4. +1 −0 Readme.md
  5. +1 −1 lib/fat.coffee
  6. +14 −1 scripts/servisi.coffee
  7. +12 −1 test/servisi.coffee
View
@@ -1,10 +1,12 @@
language: node_js
node_js:
- - "6"
-dist: trusty
+- '6'
+dist: trusty
sudo: false
deploy:
provider: script
- script: .travis/deploy.sh
+ script:
+ - openssl aes-256-cbc -K $encrypted_8b6bbaa2f436_key -iv $encrypted_8b6bbaa2f436_iv -in .travis/key.enc -out .travis/deploy_key.pem -d
+ - bash .travis/deploy.sh
on:
- branch: master
+ branch: master
View
@@ -1,7 +1,10 @@
#!/bin/bash
+
+echo -e "Host $APP_HOSTNAME\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
eval "$(ssh-agent -s)" #start the ssh agent
-echo "$FUNNY_CAT" > .travis/deploy_key.pem
+openssl aes-256-cbc -K $encrypted_8b6bbaa2f436_key -iv $encrypted_8b6bbaa2f436_iv -in .travis/key.enc -out .travis/deploy_key.pem -d
chmod 600 .travis/deploy_key.pem # this key should have push access
ssh-add .travis/deploy_key.pem
+rm -rf .travis/deploy_key.pem
git remote add dokku dokku@$APP_HOSTNAME:$APP
git push --force dokku HEAD:master
View
Binary file not shown.
View
@@ -29,6 +29,7 @@ Pomoč:
.ac <?> -- for what
.apt <paket> -- Najde pakete po imenu v packages.ubuntu.com
.asku <pojem> -- Išči po askubuntu, če vsebuje !! potem prikaže povezave
+ .btc <valuta> - Izpiše trenutno BTC vrednost na Bitstamp (na voljo USD, EUR)
.ddg -- Vse kar zna https://api.duckduckgo.com/api ali https://api.duckduckgo.com/goodies
.imdb <naslov> -- Dobi osnovne podatke z IMBD
.morje -- Izpiše temperature slovenskega morja (Koper, Debeli rtič ter Piran)
View
@@ -88,7 +88,7 @@ class Bot extends events.EventEmitter
autoConnect: false
autoRejoin: true
floodProtection: true
- floodProtectionDelay: 800
+ floodProtectionDelay: 1500
prepEvents: ->
@client.on 'error', (err) ->
View
@@ -167,4 +167,17 @@ module.exports = (bot) ->
if data
irc.reply "Trenutno se predvaja: #{data.response.BroadcastMonitor.Current.artistName} - #{data.response.BroadcastMonitor.Current.titleName}"
else
- irc.reply "OMG val202 is down!"
+ irc.reply "OMG val202 is down!"
+
+ bot.regexp /^\.btc (.+)/,
+ ".btc <valuta> - izpiše trenutno BTC vrednost na Bitstamp",
+ (match, r) ->
+ currency = match[1].toLowerCase()
+ if currency == "eur" || currency == "usd"
+ bot.fetchJSON "https://www.bitstamp.net/api/v2/ticker/btc#{currency}/", (data) ->
+ if data && ! null
+ r.reply "Vrednost BTC v #{currency.toUpperCase()}: last: #{data.last}, low: #{data.low}, high: #{data.high}, bid: #{data.bid}, ask: #{data.ask}"
+ else
+ r.reply "Bitstamp is down"
+ else
+ r.reply "Napačna valuta"
View
@@ -87,7 +87,18 @@ describe 'servisi.coffee', ->
bot.test ".time ljubljana", (msg) ->
expect(msg).to.be.a('string')
done()
+
it 'test .val', (done)->
bot.test ".val", (msg)->
expect(msg).to.be.a('string')
- done()
+ done()
+
+ it 'test .btc eur', (done)->
+ bot.test ".btc eur", (msg) ->
+ expect(msg).to.be.a('string')
+ done()
+
+ it 'test .btc usd', (done)->
+ bot.test ".btc usd", (msg) ->
+ expect(msg).to.be.a('string')
+ done()

No commit comments for this range